<template>
  <div class="container">
    <div class="header-box">
      <h3><span>语料详情</span></h3>
      <div class="look-box">
        <b>整编数据</b>
        <div class="box">
            <ul>
                <li><span>产品名称:</span>联想电脑</li>
                <li><span>规格型号:</span>90VA0014</li>
                <li><span>品牌:</span>联想</li>
                <li><span>生产厂家:</span>联想</li>
                <li><span>品种码:</span></li>
                <li><span>基准名称:</span></li>
                <li><span>分类:</span>计算机-电脑设备-笔记本电脑</li>
            </ul>
        </div>
        <b>整编规则</b>
        <div class="box">
            <ol>
                <li><span>智能查重合并:</span>合并为产品：按规格型号、品牌、参考号为比对特征字段，比对相似度人于90%<br/>比对权重：规格型号 60%，品牌 40%，或参考号100%<br/>合并为品种：按基准名称、关联主属性和次属性完全一致</li>
                <li><span>智能归类:</span>和全部分类下产品关键宇进行比对，比对相似度大于90%为同一类产品自动根据分类映射关系归类</li>
                <li><span>智能映射基准名称:</span>和全部基准名称进行比对，比对相似度大于90%为同一基准名称产品<br/>根据基准名称关联属性模型，映射模型数据元，自动进行整编<br/>如末能映射基准名称，根据属性数据，自动创建数据模型、基准名称</li>
            </ol>
        </div>
        <b>整编结果</b>
        <el-table :data="tableData" border stripe size="mini" style="width: 100%">
            <el-table-column type="index" label="序号" align="center" width="100"></el-table-column>
            <el-table-column prop="name" label="产品名称" align="center" width="220"></el-table-column>
            <el-table-column prop="model" label="规格型号" align="center" ></el-table-column>
            <el-table-column prop="brand" label="品牌"  align="center" ></el-table-column>
            <el-table-column prop="plant" label="生产厂家"  align="center" ></el-table-column>
            <el-table-column prop="variety" label="品种码"  align="center" ></el-table-column>
            <el-table-column prop="varietyName" label="品种名称"  align="center" ></el-table-column>
            <el-table-column prop="standard" label="基准名称"  align="center" ></el-table-column>
            <el-table-column prop="class" label="分类"  align="center" ></el-table-column>
            <el-table-column prop="score" label="综合评分"  align="center" ></el-table-column>
            <el-table-column prop="suggest" label="处理建议"  align="center" ></el-table-column>
        </el-table>
        <b>样本分类</b>
        <el-alert v-if="tab" title="正向样本：归类、映射准确，合并推存合理。" type="success" description="" show-icon></el-alert>
        <el-alert title="反向样本:归类、基准名称映射不准确，推荐合并不合理。" type="error" description="" show-icon v-else></el-alert>
      </div>

    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'look',
  data() {
      return {
        tab:true,
        tableData:[],
        tableData1: [{
          name: '拯救者 刃9000K-341RZ 1714700KF32G 2TGW-4UD微型计算机',
          model: '90vA0014C',
          brand:'Lenovo',
          plant:'联想(北京)有限公司',
          variety:'AC2938300',
          varietyName:'计算机',
          standard:'计算机',
          class:'[自行采购平台分类]电脑 设备-电脑整机-笔记本电脑',
          score:'98',
          suggest:'推荐合并'
        },{
          name: '拯救者',
          model: '90vA0014B',
          brand:'Lenovo',
          plant:'联想(北京)有限公司',
          variety:'AC2938300',
          varietyName:'计算机',
          standard:'计算机',
          class:'[自行采购平台分类]电脑 设备-电脑整机-笔记本电脑',
          score:'85',
          suggest:''
        }],
        tableData2: [{
          name: '笔记本电脑',
          model: '90vA0014C',
          brand:'联想',
          plant:'联想(北京)有限公司',
          variety:'AC1073414',
          varietyName:'笔记本电脑',
          standard:'笔记本电脑',
          class:'[资产管理分类]设备器材 通用办公设备器材-办公设备-计算机',
          score:'85',
          suggest:'不推荐合并'
        },{
          name: '便携式计算机',
          model: '',
          brand:'联想 Lenovo',
          plant:'',
          variety:'AC1141108',
          varietyName:'便携式计算机(13英寸)',
          standard:'便携式计算机(13英寸)',
          class:'[自行采购平台分类]电脑 设备-电脑整机-笔记本电脑',
          score:'60',
          suggest:''
        }]
      }
   },
   mounted(){
        if(this.$route.query.type=="正向样本"){
            this.tab=true
            this.tableData=this.tableData1
        }else{
            this.tab=false
            this.tableData=this.tableData2
        }
   }
}
</script>
<style lang="scss">

</style>
<style lang="scss" scoped>
 .header-box{
      height: 100%;
  }
  .look-box{
    padding: 0 20px;
    padding-bottom: 30px;
    b{
        display: block;
        font-size: 14px;
        color: #144a74;
        height: 40px;
        line-height: 40px;
    }
    &>div.box{
        border: 1px solid #EBEEF5;
        padding: 10px;
    }
    ul{
        margin: 0;
        padding: 0;
        li{
            min-width: 120px;
            display: inline-block;
            font-size: 14px;
            color: #333;
            margin-right: 10px;
            span{
                color: #666;
                margin-right: 5px;
            }
        }
    }
    ol{
        margin: 0;
        padding: 0;
        li{
            display: block;
            font-size: 14px;
            color: #333;
            line-height: 25px;
            padding-left: 130px;
            margin-bottom: 10px;
            position: relative;
            span{
                display: inline-block;
                color: #666;
                font-weight: bold;
                text-align: right;
                width: 120px;
                position: absolute;
                left: 0;
            }
        }
    }
  }
</style>
